import request from "../utils/request"

/**
 * 
 * @returns 无
 * @作用 查询维修项目-选项 
 */
export const repairItemAPI  = () => {
  return request.get('/repairItem')
}

/**
 * 
 * @returns data
 * @作用 新增或者编辑报修信息 
 */
export const formrepairAPI = data => {
  return request.post('/repair',data)
}

/**
 * 
 * @returns current当前页码,pageSize每页大小
 * @作用 查询-我的报修列表 
 */
export const getrepairlistAPI = (current,pageSize) => {
  return request.get('/repair',{current,pageSize})
}

/**
 * 
 * @param {*} id 
 * @returns 查询报修详情信息
 */
export const getdetailrepairAPI = id => {
  return request.get(`/repair/${id}`)
}

/**
 * 
 * @param {*} id 
 * @returns 取消报修
 */
export const deleterepaireAPI = id => {
  return request.put(`/cancel/repaire/${id}`)
}